// TestLib.cpp : Defines the entry point for the application.
//

#include "pch.h"
#include "TestLibDlg.h"
#include "TestAsync.h"

int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow)
{
	_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
	new int(0x11223344); // Test memory leak
	AsyncLibInit(ATID_MAX);

	CTestLibDlg dlg;
	dlg.Create(NULL);
	dlg.ShowWindow(SW_SHOW);

	MSG msg;
	while (GetMessage(&msg, NULL, 0, 0))
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}

	TestAsync::TestCancel();
	AsyncLibExit();
	return 0;
}
